﻿using System.Collections.Generic;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.AppInfo;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.AppInfo
{
    public interface IAppBasicInfoReponsitory
    {
        /// <summary>
        ///     根据纵联商城接入关键字获取所有app信息
        /// </summary>
        /// <param name="zlcompanykey"></param>
        /// <returns></returns>
        IEnumerable<AppBasicInfoEntity> GetAppsByKey(string zlcompanykey);

        /// <summary>
        ///     根据微信Appid获取App信息
        /// </summary>
        /// <param name="appid"></param>
        /// <returns></returns>
        AppBasicInfoEntity GetAppsByAppid(string appid);

        /// <summary>
        ///     新增
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void AddInfo(AppBasicInfoEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     修改
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void RemoveInfo(AppBasicInfoEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     删除
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void EditInfo(AppBasicInfoEntity entity, UnitOfWork unit = null);
    }
}